81 WDT_A_hold(WDT_A_BASE);
84 GPIO_setAsPeripheralModuleFunctionOutputPin(
94 CS_clearAllOscFlagsWithTimeout(1000);
97 GPIO_setAsInputPinWithPullUpResistor(
98 GPIO_PORT_S1 | GPIO_PORT_S2,
99 GPIO_PIN_S1 | GPIO_PIN_S2);
104 GPIO_PORT_LED1 | GPIO_PORT_LED2,
105 GPIO_PIN_LED1 | GPIO_PIN_LED2);
107 GPIO_PORT_LED1 | GPIO_PORT_LED2,
108 GPIO_PIN_LED1 | GPIO_PIN_LED2);
115 GPIO_selectInterruptEdge(
116 GPIO_PORT_S1 | GPIO_PORT_S2,
117 GPIO_PIN_S1 | GPIO_PIN_S2,
118 GPIO_HIGH_TO_LOW_TRANSITION);
119 GPIO_enableInterrupt(
120 GPIO_PORT_S1 | GPIO_PORT_S2,
121 GPIO_PIN_S1 | GPIO_PIN_S2);
133 GPIO_PORT_S1 | GPIO_PORT_S2,
134 GPIO_PIN_S1 | GPIO_PIN_S2);
145 RTC_CLOCKPREDIVIDER_1024);
148 RTC_OVERFLOW_INTERRUPT);
151 RTC_CLOCKSOURCE_XT1CLK);
157 __bic_SR_register(GIE);
161 ICC_setInterruptLevel(ICC_ILSR_P4, ICC_LEVEL_0);
163 ICC_setInterruptLevel(ICC_ILSR_P2, ICC_LEVEL_3);
165 ICC_setInterruptLevel(ICC_ILSR_RTC_COUNTER, ICC_LEVEL_1);
171 __bis_SR_register(LPM3_bits + GIE);
175 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
176 #pragma vector=PORT4_VECTOR
177 __interrupt
void Port_4(
void)
178 #elif defined(__GNUC__)
179 void __attribute__ ((interrupt(PORT4_VECTOR))) Port_4 (
void)
181 #error Compiler not supported!
190 GPIO_PORT_LED1 | GPIO_PORT_LED2,
191 GPIO_PIN_LED1 | GPIO_PIN_LED2);
196 GPIO_PORT_LED1 | GPIO_PORT_LED2,
197 GPIO_PIN_LED1 | GPIO_PIN_LED2);
201 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
202 #pragma vector=PORT2_VECTOR
203 __interrupt
void Port_2(
void)
204 #elif defined(__GNUC__)
205 void __attribute__ ((interrupt(PORT2_VECTOR))) Port_2 (
void)
207 #error Compiler not supported!
227 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
228 #pragma vector=RTC_VECTOR
230 #elif defined(__GNUC__)
231 void __attribute__ ((interrupt(RTC_VECTOR)))
RTC_ISR (
void)
233 #error Compiler not supported!
236 switch(__even_in_range(RTCIV,RTCIV_RTCIF))
238 case RTCIV_NONE:
break;
241 __bis_SR_register(GIE);
GPIO_setOutputHighOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)
GPIO_setOutputLowOnPin(GPIO_PORT_LED1|GPIO_PORT_LED2, GPIO_PIN_LED1|GPIO_PIN_LED2)